A numerical method for calculation of the generalized Chakalov-Popoviciu quadrature formulae of Radau and Lobatto type, using the results given for the generalized Chakalov-Popoviciu quadrature formula, is given. Numerical results are included. As an application we discuss the problem of approximating a function f on the finite interval I = [a, b] by a spline function of degree m and variable defects dv, with n (variable) knots, matching as many of the initial moments of f as possible. An analytic formula for the coefficients in the generalized Chakalov-Popoviciu quadrature formula is given.